-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General whitespace cleanup #7074
Conversation
respencer
commented
Jun 14, 2024
- Changed tabs to spaces
- Deleted trailing spaces
- Automatically fix code formatting in changed files
- Delete some more comments
9c93cb4
to
86a0749
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is all of this manual, how can we stop it moving forward
I don't see much chance of this happening in future. Editing software handles things much better now and we have styleci checking on new commits. |
@respencer if you can, consider adding |
src/GroupPropsFormRowOps.php
Outdated
@@ -32,28 +22,23 @@ | |||
extract(mysqli_fetch_array($rsGroupInfo)); | |||
|
|||
// Abort if user tries to load with group having no special properties. | |||
if ($grp_hasSpecialProps == false) { | |||
if ($grp_hasSpecialProps === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make sure this works? Typically, these values aren't typed correctly when pulled directly from mysqli functions unless the variables are bound (another reason why things should be moved to the ORM)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure right now, so will revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need to go through each comment to uppercase the first char but since you already did it, I'm not opposed.
The only real concern is the strict equality check change potentially breaking
Another thing to consider is adding some "best practice" to a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good PR. Thank you for removing the headers. I was not sure if people would be upset, so I kept them.
I made a few comments nothing big, approving once you address other comment please merge away
</table> | ||
</td> | ||
<form method="get" action="FindFundRaiser.php" name="FindFundRaiser"> | ||
<input name="sort" type="hidden" value="<?= $sSort ?>" <table cellpadding="3" align="center"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, why what?
_or()->filterByLastName($searchLikeString, Criteria::LIKE)-> | ||
_or()->filterByEmail($searchLikeString, Criteria::LIKE)-> | ||
limit(15)->find(); | ||
$people = PersonQuery::create()->filterByFirstName($searchLikeString, Criteria::LIKE)->_or()->filterByMiddleName($searchLikeString, Criteria::LIKE)->_or()->filterByLastName($searchLikeString, Criteria::LIKE)->_or()->filterByEmail($searchLikeString, Criteria::LIKE)->limit(15)->find(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the original is easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, automatically reformatted. Thing with moving it back as it was is it will just be automatically reformatted again at some point in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the automatic reformatter used? I don't think PHPCS would do this since it didn't every time I ran this prior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP Intelephense. Installed phpcs earlier today, will see what that does on this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the automatic reformatter used? I don't think PHPCS would do this since it didn't every time I ran this prior
phpcs
had a lot to complain about, including with how the file was initially. I have yet to figure out how to get phpcbf
to care.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I figured out how to get them all happy. Still have no idea why this wasn't an issue previously.
4f6b438
to
b1de5f1
Compare
- Changed tabs to spaces - Deleted trailing spaces - Automatically fix code formatting in changed files - Delete some more comments
b1de5f1
to
6206687
Compare
src/mysql/upgrade/3.0.0.sql
Outdated
DROP TABLE IF EXISTS `menu_links`; | ||
CREATE TABLE `menu_links` ( | ||
`linkId` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, | ||
`linkId` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're choosing to capitalize keywords, this should be consistent.
`linkId` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
`linkName` VARCHAR(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`linkUri` TEXT COLLATE utf8_unicode_ci NOT NULL,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't choose anything, the formatter I used did.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which formatter is this? I don't believe this is documented anywhere and is not in the CI so the formatting was a choice 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't matter, rolled back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want this formatting to happen and for it to be consistent across devs, we can include it - it would just need to be documented and (if possible) added to the CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, thank you. It was a bad idea.
Will look at it again at some future date with a different formatter.
src/mysql/upgrade/2.1.0.sql
Outdated
SELECT 0, | ||
fam_ID, | ||
0, | ||
"Original Entry", | ||
fam_EnteredBy, | ||
fam_DateEntered, | ||
"create" | ||
FROM family_fam; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not the biggest fan of this formatting change - from quick glance, it looks like you're just trying to invoke a select but the select is actually being used as inputs for the insert. This previously was indented to express context and now that context is lost unless the reviewer keeps track of the scope in their head at all times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will revert.
09da784
to
39559b5
Compare